﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Simhopp.Client
{
    /// <summary>
    /// Interaction logic for ViewJudge.xaml
    /// </summary>
    public sealed partial class ViewJudge : UserControl
    {
        public ViewJudge()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Handles enter-key presses on the Score-Slider.
        /// </summary>
        /// <param name="sender">The invoking object</param>
        /// <param name="e">The event arguments</param>
        private void ScoreSlider_OnKeyDown(object sender, KeyEventArgs e)
        {
            if (App.Current.MainWindow.IsFocused)
            {
                if (e.Key == Key.Return)
                {
                    ButtonOk.Command.Execute(scoreSlider.Value);
                }
            }
        }
    }
}
